<%--
  Created by IntelliJ IDEA.
  User: xiaolinzhang
  Date: 2017/4/24
  Time: 09:27
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>账号列表</title>
</head>
<body>
<table id="dg" title="账号列表" style="width:100%;height:100%" data-options="
				rownumbers:true,
				singleSelect:true,
				autoRowHeight:false,
				pagination:true,
				pageSize:10,
                url:'${pageContext.request.contextPath}/login/alluser',method:'get'">
    <thead>
    <tr>
        <th field="id" width="10%">序号</th>
        <th field="username" width="15%">账号</th>
    </tr>
    </thead>
</table>

<script type="text/javascript">
    $(function(){
        var pager = $('#dg').datagrid().datagrid('getPager');	// get the pager of datagrid
        pager.pagination({
            buttons:[{
                iconCls:'icon-search',
                handler:function(){
                    alert('search');
                }
            },{
                iconCls:'icon-add',
                handler:function(){
                    alert('add');
                }
            },{
                iconCls:'icon-edit',
                handler:function(){
                    alert('edit');
                }
            }]
        });
    })
</script>
</body>
</html>
